home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
sos3-2.lha
/
include
/
trc.h
< prev
Wrap
C/C++ Source or Header
|
1992-01-23
|
3KB
|
120 lines
/* --------------------------------------------------------------------------
* Copyright 1992 by Forschungszentrum Informatik (FZI)
*
* You can use and distribute this software under the terms of the licence
* you should have received along with this program.
* If not or if you want additional information, write to
* Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
* D-7500 Karlsruhe 1, Germany.
* --------------------------------------------------------------------------
*/
/* **************************** */
/* ** tt-Modul Schnittstelle ** */
/* **************************** */
#ifndef TRCH
#define TRCH
typedef int T_addrformat;
#define T_DEC ( T_addrformat ) 1
#define T_UNS ( T_addrformat ) 2
#define T_OCT ( T_addrformat ) 3
#define T_HEX ( T_addrformat ) 4
#ifdef NO_TT
#define TT(l,c)
#define TTN(l,c)
#define T_PROC(n)
#define T_ENTER
#define T_LEAVE
#define T_INIT(name)
#define T_REDEF(spec)
#define T_EXIT()
#else
extern unsigned char tt_active[];
extern T_addrformat tt_addrformat;
#if defined(__cplusplus) || defined(c_plusplus)
extern "C"
{ char *tt_calloc (char*, const int),
*tt_alloc (char*, const int);
void tt_free (char*, char*),
tt_init (const char* const),
tt_redef (const char* const),
tt_exit (),
tt_enter (const char* const),
tt_leave (const char* const),
tt_nl (),
tt_txt (const char* const),
tt_i (const char* const, const int),
tt_u (const char* const, const unsigned),
tt_o (const char* const, const unsigned),
tt_x (const char* const, const unsigned),
tt_li (const char* const, const long),
tt_lo (const char* const, const long),
tt_lx (const char* const, const long),
tt_c (const char* const, const int),
tt_s (const char* const, const char*),
tt_a (const char* const, const char* const, const int),
tt_sa (const char* const, const char** const, const int),
tt_p (const char* const, const void* const);
}
#else
extern char *tt_calloc (),
*tt_alloc ();
extern void tt_free (),
tt_init (),
tt_redef (),
tt_exit (),
tt_enter (),
tt_leave (),
tt_nl (),
tt_i (),
tt_u (),
tt_x (),
tt_li (),
tt_lo (),
tt_lx (),
tt_c (),
tt_s (),
tt_a (),
tt_sa (),
tt_p (),
tt_txt ();
#endif defined(...)
#define T_PROC(n) char *tt_proc = (n);
#define T_INIT(name) tt_init ( name );
#define T_REDEF(spec) tt_redef ( spec );
#define T_EXIT() tt_exit ();
#define TT(l,c) if(tt_active[l]){c;tt_nl();}
#define TTN(l,c) if(tt_active[l]){c;}
#define T_ENTER tt_enter ( tt_proc );
#define T_LEAVE tt_leave ( tt_proc );
#define TB(b) tt_txt ((b) ? "b: TRUE" : "b: FALSE")
#define TXT(xt) tt_txt ( xt )
#define TI(i) tt_i ( "i:", i )
#define TU(u) tt_u ( "u:", u )
#define TO(o) tt_o ( "o:", o )
#define TX(x) tt_x ( "x:", x )
#define TLI(li) tt_li ( "li:", li )
#define TLO(lo) tt_lo ( "lo:", lo )
#define TLX(lx) tt_lx ( "lx:", lx )
#define TC(c) tt_c ( "c:", c )
#define TS(s) tt_s ( "s:", s )
#define TA(a,n) tt_a ( "a:", a, n )
#define TSA(a,n) tt_sa ( "a:", a, n )
#define TP(p) tt_p ( "p:", p )
#define TsS(sS) {char *_x=(sS).make_Cstring(); tt_s("sS:",_x); delete _x;}
#define TOBJ(o) {tt_i("o.c:", (int)o.container()); tt_i("o.o:", (int)o.offset());}
#endif NO_TT
#endif TRCH